package com.sunrise.xdoc.dao.impl;

import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Repository;

import com.sunrise.xdoc.dao.IUserDao;
import com.sunrise.xdoc.entity.user.User;
@Repository("userDao")
public class UserDao extends BaseDao<User> implements IUserDao {

	@Override
	public User loadUserByUsername(String userName) {
		return findFirstByCriteria(getDetachedCriteria().add(Restrictions.eq("username", userName)));
	}

}
